/**
 * Created by zhouwei on 2017/4/21.
 */
import http from '../common/http'
import helper from '../common/helper'

export default {
    /*验证码提交*/
    login:function (params,success) {
        http.post('/v1/goverment/login',params,function (data) {
            success(data);
        });
    },
    town_user:function (params,success) {
        http.get('/v1/goverment/town_user',params, function (data) {
            success(data);
        })
    },
    village_user:function (params,success) {
        http.get('/v1/goverment/village_user',params, function (data) {
            success(data);
        })
    },
    village_farmer:function (params,success) {
        http.get('/v1/goverment/village_farmer',params, function (data) {
            success(data);
        })
    },
    add_town_user:function (params,success) {
        http.post('/v1/goverment/add_town_user',params, function (data) {
            success(data);
        })
    },
    add_village_user:function (params,success) {
        http.post('/v1/goverment/add_village_user',params, function (data) {
            success(data);
        })
    },
    update_town_user:function (params,success) {
        http.put('/v1/goverment/update_town_user',params,function (data) {
            success(data);
        })
    },
    update_village_user:function (params,success) {
        http.put('/v1/goverment/update_village_user',params,function (data) {
            success(data);
        })
    },
    agree_farmer_auth:function (params,success) {
        http.put('/v1/goverment/agree_farmer_auth',params,function (data) {
            success(data);
        })
    },
    refuse_farmer_auth:function (params,success) {
        http.put('/v1/goverment/refuse_farmer_auth',params,function (data) {
            success(data);
        })
    }
}